package com.sskj.zixun.presenter;

import com.lzy.okrx2.adapter.FlowableBody;
import com.sskj.common.base.HttpData;
import com.sskj.lib.bean.PageBean;
import com.sskj.lib.http.JsonConverter;
import com.sskj.zixun.bean.NoticeList;
import com.sskj.zixun.ui.activity.GongGaoActivity;

import java.util.List;

import io.reactivex.Flowable;


public class ZixunFragmentPresenter extends BasePresenter<GongGaoActivity> {
    public Flowable<List<NoticeList>> getData(int pageNum) {
        return httpService.getGGList(pageNum)
                .converter(new JsonConverter<HttpData<List<NoticeList>>>() {
                })
                .adapt(new FlowableBody<>())
                .map(HttpData::getData);
    }
}
